﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using NOS.AMF.Message;

namespace NOS.AMF.Binary
{
    enum DataType
    {   Number = 0,  
        Boolean = 1,
        String = 2,        
        UntypedObject = 3,
        MovieClip = 4,
        Null = 5,
        Undefined = 6,
        ReferencedObject = 7,
        MixedArray = 8,
        End = 9,
        Array = 10,
        Date = 11,
        LongString = 12,
        TypeAsObject = 13,
        Recordset = 14,
        Xml = 15,
        TypedObject = 16
    }

    internal class Binarydeserializer : BinaryReader
    {
        #region . Contructors . 

        public Binarydeserializer(Stream Input) : base(Input) 
        {

        }

        #endregion

        #region . Public Methods .


        #endregion


        #region . Private Methods .

        private object ReadData(byte type)
        {
            DataType dtype = (DataType)type;
            switch (dtype)
            {
                case DataType.Number:
                    return ReadDouble();
                case DataType.Boolean:
                    return ReadBoolean();
                case DataType.String:
                    //return ReadShortString();
                case DataType.Array:
                    //return ReadArray();
                case DataType.Date:
                    //return ReadDate();
                case DataType.LongString:
                    //return ReadLongString();
                case DataType.TypedObject:
                    //return ReadTypedObject();
                case DataType.MixedArray:
                    //return ReadDictionary();
                case DataType.Null:
                case DataType.Undefined:
                case DataType.End:
                    return null;
                case DataType.UntypedObject:
                    //return ReadUntypedObject();
                case DataType.Xml:
                    //return ReadXmlDocument();
                case DataType.MovieClip:
                    return null;
                case DataType.ReferencedObject:
                    return null;
                case DataType.TypeAsObject:
                    return null;
                case DataType.Recordset:
                    return null;
                default: return null;
            } 
        }
  

        #endregion

    }
}